From d8127709e3601acd012f1b71bd56485fb2aea5d4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 Aug 2025 12:54:43 -0400 Subject: [PATCH] showOutput tahoe store and retrieve both output messages which cannot be shut up with --quiet. The messages go to stderr, which makes it hard to avoid displaying them without hiding problems. This kinda sucks. Using showOutput helps with output formatting, but with -J this output is still scrambled in with the progress output. --- Remote/Tahoe.hs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Remote/Tahoe.hs b/Remote/Tahoe.hs index 76b17caa5b..8c0d6d1631 100644 --- a/Remote/Tahoe.hs +++ b/Remote/Tahoe.hs @@ -147,7 +147,8 @@ tahoeSetup _ mu _ c _ = do missingfurl = giveup "Set TAHOE_FURL to the introducer furl to use." store :: RemoteStateHandle -> TahoeHandle -> Key -> AssociatedFile -> Maybe OsPath -> MeterUpdate -> Annex () -store rs hdl k _af o _p = sendAnnex k o noop $ \src _sz -> +store rs hdl k _af o _p = sendAnnex k o noop $ \src _sz -> do + showOutput parsePut <$> liftIO (readTahoe hdl "put" [File (fromOsPath src)]) >>= maybe (giveup "tahoe failed to store content") (\cap -> storeCapability rs k cap) @@ -160,8 +161,10 @@ retrieve rs hdl k _f d _p _ = do return Verified where go Nothing = giveup "tahoe capability is not known" - go (Just cap) = unlessM (liftIO $ requestTahoe hdl "get" [Param cap, File (fromOsPath d)]) $ - giveup "tahoe failed to reteieve content" + go (Just cap) = do + showOutput + unlessM (liftIO $ requestTahoe hdl "get" [Param cap, File (fromOsPath d)]) $ + giveup "tahoe failed to reteieve content" remove :: Maybe SafeDropProof -> Key -> Annex () remove _ _ = giveup "content cannot be removed from tahoe remote" -- 2.30.2